package com.auxgroup.smarthome.init;

import com.auxgroup.smarthome.IserverInitService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEvent;
import org.springframework.stereotype.Service;

/**
 * Created by kevinchen on 2017/7/27.
 */
@Service
public class InitService implements IserverInitService {
    @Autowired
    private InitSnoti initSnoti;

    /**
     * 初始化执行
     * @param event
     */
    @Override
    public void appStartedOperate(ApplicationEvent event) {
        initSnoti.initConnectSnoti();
    }

    @Override
    public void appClosedOperate(ApplicationEvent event) {
        System.err.println("snoti-server微服务关闭");
    }
}
